package ooday01;
/** Student类的测试类 */
public class StudentTest {
    public static void main(String[] args) {
        //创建一个学生对象
        Student zg = new Student();
        //访问成员变量
        zg.name = "张光";
        zg.age = 22;
        zg.className = "jsd2403";
        zg.stuId = "001";
        //调用方法
        zg.study();
        zg.sayHi();
        zg.playWith("李林");

        Student ll = new Student();
        ll.name = "李林";
        ll.age = 23;
        ll.className = "jsd2403";
        ll.stuId = "002";
        ll.study();
        ll.sayHi();
        ll.playWith("张光");

        //1)创建了一个学生对象
        //2)给所有成员变量赋默认值
        Student zl = new Student();
        zl.study();
        zl.sayHi();
        zl.playWith("张光");
    }
}












